MAPS
Photo from Wikipedia Commons
Shrikes were songbirds; he ought to know…
— Jodi Meadows
The red-backed shrike (Lanius collurio) is a carnivorous passerine bird and member of the shrike family Laniidae. Its breeding range stretches from Western Europe east to central Russia. It is migratory and winters in the eastern areas of tropical Africa and southern Africa.
routes <- read.csv("archetypes/red-backed-shrike/red-backed-shrike-coords.csv", header = TRUE)
routes
stopovers <- read.csv("archetypes/red-backed-shrike/red-backed-shrike-main-stopovers.csv", header = TRUE)
stopovers
ne_world <- ne_countries(scale = "medium", returnclass = "sf")
centroids = read.csv("archetypes/red-backed-shrike//country-centroids.csv", header = TRUE, stringsAsFactors = FALSE, as.is=T)
countryref <- centroids %>% select(iso3c, latitude, longitude)
countryref <- filter(countryref, latitude > -35 & latitude < 60)
countryref <- filter(countryref, longitude > -20 & longitude < 55)
countryref
theme_opts <- theme(
axis.line=element_blank(),
axis.text.x=element_blank(),
axis.text.y=element_blank(),
axis.ticks=element_blank(),
axis.title.x=element_blank(),
axis.title.y=element_blank(),
legend.position="none",
legend.title = element_blank(),
panel.grid.major = element_blank(),
panel.grid.minor = element_blank(),
panel.background=element_rect(fill="#ffffff", colour="#ffffff"),
panel.border = element_blank()
)
# color palette for number of months
pal <- wes_palette("Zissou1", 12, type = "continuous")
v1 <- ggplot(data = ne_world) +
geom_sf(data = ne_world, fill="#f5f5f5", color="#d5d5d5", size=1.0) +
geom_text(data= countryref, aes(x=longitude, y=latitude, label=iso3c),
color = "gray20", fontface = "italic", check_overlap = T, size = 2) +
# routes
geom_path(data = routes, aes(y, x), alpha = 0.8, size = 1.5, color = "#666666" ) +
geom_point(data = routes, aes(y, x), shape=21, alpha = 1.0, size = 2.0, fill = "#ffffff", color = "#666666") +
# stopovers
geom_point(data = stopovers, aes(Medianlon, Medianlat, size = stopover_duration, color = Main_month), alpha = 0.9) +
# Now, for each of these points we plot the uncertainties
# Horizontal
geom_segment(data = stopovers, aes(y=Medianlat, x=FstQu.lon, xend=TrdQu.lon, yend=Medianlat), size = 0.5) +
# Vertical
geom_segment(data = stopovers, aes(y=FstQu.lat, x=Medianlon, xend=Medianlon, yend=TrdQu.lat), size = 0.5) +
# color and size scales
scale_color_gradientn(colours = pal) +
scale_size_continuous(range=c(3,12)) +
# limit view to relevant area
coord_sf(xlim = c(-20, 55), ylim = c(-35, 60), expand = TRUE) +
theme_bw() +
labs(x=NULL,
y=NULL,
title = "Red-Backed Shrike",
subtitle="Geolocation Routes") +
theme_opts
girafe(ggobj = v1, width_svg = 1280/72, height_svg = 720/72,
options = list(opts_sizing(rescale = TRUE, width = 1.0))
)